public class TaxCalculator {
    public static final double START_POINT = 3500;

    public static double calculate(Person person) {
        if (person.getWage() < 0) throw new IllegalArgumentException();
        double tax;

        double remain = person.getWage() - START_POINT;
        if (remain < 0) tax = 0;
        else if (remain < 500) tax = remain * .05;
        else if (remain < 2000) tax = remain * .1;
        else if (remain < 5000) tax = remain * .15;
        else if (remain < 20000) tax = remain * .2;
        else if (remain < 40000) tax = remain * .25;
        else if (remain < 60000) tax = remain * .3;
        else if (remain < 80000) tax = remain * .35;
        else if (remain < 100000) tax = remain * .4;
        else tax = remain * .45;

        return tax;
    }

    public static String showTax(Person person) {
        return "NAME: " + person.getName() + " TAX: " + calculate(person);
    }
}
